import 'package:flutter_module/common/http/request/base_request.dart';

/// Create by kyluzoi
/// Date: 2021-08-23
///
/// Description:

/// 获取合作服务商详情
class CooperationDetailRequest extends BaseRequest {
  @override
  bool needLogin() {
    return true;
  }

  @override
  String path() {
    return "/coc/app/user/service/provider/detail";
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.POST;
  }
}

/// 获取 商户IM 账户信息
class GetIMUserRequest extends BaseRequest {
  // 需要 contactId ， contactType

  GetIMUserRequest(contactId, contactType) {
    addQurey("contactId", contactId);
    addQurey("contactType", contactType);
  }

  @override
  bool needLogin() {
    return true;
  }

  @override
  String path() {
    return "/coc/app/im/getImUserByContactId";
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.GET;
  }
}

/// 收藏 / 取消收藏
class RequestCollectCooperative extends BaseRequest {
  @override
  bool needLogin() {
    return true;
  }

  @override
  String path() {
    return "/coc/app/user/service/provider/collect";
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.POST;
  }

  @override
  bool isJson() {
    return false;
  }
}

class CooperationListReuest extends BaseRequest {
  @override
  bool needLogin() {
    return true;
  }

  @override
  String path() {
    return '/coc/app/user/service/provider/page_list';
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.POST;
  }
}

class CooperationAddressRequest extends BaseRequest {
  @override
  bool needLogin() {
    return false;
  }

  @override
  String path() {
    return '/coc/app/app/address/queryrovinces';
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.GET;
  }
}

class DicListRequest extends BaseRequest {
  @override
  bool needLogin() {
    return false;
  }

  @override
  String path() {
    return '/coc/app/dict/ajax/dic_list';
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.GET;
  }
}
